package main

import (
	"fmt"
	"os/exec"
)

func main() {
	strCmd := "lshw -short -C memory | grep /0/3a/"

	cmd := exec.Command("bash", "-c", strCmd)

	output, err := cmd.Output()
	if err != nil {
		fmt.Println("命令执行出错:", err)
		return
	}

	fmt.Println(string(output))
}
